package model;


public class SignExtend extends FunctionalUnit {
	
	private int offset;
	
	public SignExtend(Pipe sourcePipe, Pipe destinationPipe) {
		super(sourcePipe, destinationPipe);
	}
	
	public void execute1() {
		offset = getPipeData("OFFSET");
		Facade.getInstance().move(UnitEnum.Pipe1, UnitEnum.SignExtend, offset);
	}
	
	public void execute2() {
		setPipeData("OFFSET", offset);
		Facade.getInstance().move(UnitEnum.SignExtend, UnitEnum.Pipe2, offset);
	}
	
}
